<?php

namespace App\Http\Requests;


class UserGroupRequest extends BaseRequest
{

    public function rules()
    {
        return [
            'group_name' => 'required|between:1,50|unique:cz_user_group,group_name,'.$this->post('id'),
        ];
    }

    public function messages()
    {
        return [
            'group_name.required' => '名称必须填写',
            'group_name.between' => '名称1-50个字符之间',
            'group_name.unique' => '名称已存在',
        ];
    }
}
